#include <stdio.h>
#include <string.h>

void str_bin(char str1[], char str2[]) {
    int i = 0, j = 0, k = 0;
    int len1 = strlen(str1);
    int len2 = strlen(str2);
    char result[101];
    strncpy(result, str1, len1 + 1);
    while (i < len1 && j < len2) {
        if (str1[i] < str2[j])
            result[k++] = str1[i++];
        else
            result[k++] = str2[j++];
    }
    while (i < len1)
        result[k++] = str1[i++];
    while (j < len2)
        result[k++] = str2[j++];
    strncpy(str1, result, k + 1);
}

void main() {
    char str1[101];
    char str2[101];
    scanf("%s", str1);
    scanf("%s", str2);
    int l = strlen(str1) + strlen(str2);
    str_bin(str1, str2);
    for (int i = 0; i < l; i++)
        printf("%c", str1[i]);
    return 0;
}